import { Controller, Get, Post, Body, Patch, Param, Delete, Query } from '@nestjs/common';
import { AttemptCustomerService } from './attempt-customer.service';
import { AttemptCustomer } from '@libs/db/models/attempt.model';
import { IPaginationFormWithCondition } from 'types/requestParams';

@Controller('attempt-customer')
export class AttemptCustomerController {
  constructor(private readonly attemptCustomerService: AttemptCustomerService) { }

  @Post('create')
  create(@Body() body: AttemptCustomer) {
    return this.attemptCustomerService.create(body);
  }

  @Post('find')
  findAll(@Body() body: IPaginationFormWithCondition) {
    return this.attemptCustomerService.findAll(body);
  }


  @Post('update')
  update(@Body() body: AttemptCustomer) {
    return this.attemptCustomerService.update(body);
  }

  @Delete('delete')
  remove(@Query() id: string) {
    return this.attemptCustomerService.remove(+id);
  }
}
